package com.cnki.caselib.service;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.cnki.caselib.dao.UserDao;
import com.cnki.caselib.domain.User;

public class UserService {
    @Resource
    private UserDao userDao;
	private Log logger = LogFactory.getLog(UserService.class);
    public int updateUser(long uid,int credit){
    	User user=new User();
    	user.setUid(uid);
    	user.setCredit(credit);
    	logger.debug("uid:"+uid+"  credit:"+credit);
    	return userDao.update(user);
    }

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
}
